package io.renren.modules.substation.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.substation.dao.TSampThDataInfoDao;
import io.renren.modules.substation.entity.TSampThDataInfoEntity;
import io.renren.modules.substation.service.TSampThDataInfoService;


@Service("tSampThDataInfoService")
public class TSampThDataInfoServiceImpl extends ServiceImpl<TSampThDataInfoDao, TSampThDataInfoEntity> implements TSampThDataInfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TSampThDataInfoEntity> page = this.page(
                new Query<TSampThDataInfoEntity>().getPage(params),
                new QueryWrapper<TSampThDataInfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public int updateByDevId(TSampThDataInfoEntity tSampThDataInfoEntity){

        return baseMapper.updateByDevId(tSampThDataInfoEntity);
    }

    @Override
    public TSampThDataInfoEntity queryThInfoByCondition(TSampThDataInfoEntity tSampThDataInfoEntity)
    {
        return baseMapper.queryThInfoByCondition(tSampThDataInfoEntity);
    }
}